import unittest
from XTestRunner import HTMLTestRunner
from po.tools import Tools
if __name__ == '__main__':
    unit=unittest.defaultTestLoader.discover(start_dir='po/case', pattern='TestCase.py')
    with open('po/baogao/baogao.html', 'wb')as f:
        runner=HTMLTestRunner(stream=f,title='测试报告',description='个人中心',rerun=1,language='zh-CN')
        runner.run(unit)
    Tools.send_mail()